-
-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEPR: returning tuple when grouping by a list containing single element #47761
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! I think we're just about there. Some last minor comments.
doc/source/whatsnew/v1.5.0.rst
Outdated
@@ -774,6 +774,7 @@ Other Deprecations | |||
- Deprecated :meth:`Series.rank` returning an empty result when the dtype is non-numeric and ``numeric_only=True`` is provided; this will raise a ``TypeError`` in a future version (:issue:`47500`) | |||
- Deprecated argument ``errors`` for :meth:`Series.mask`, :meth:`Series.where`, :meth:`DataFrame.mask`, and :meth:`DataFrame.where` as ``errors`` had no effect on this methods (:issue:`47728`) | |||
- Deprecated arguments ``*args`` and ``**kwargs`` in :class:`Rolling`, :class:`Expanding`, and :class:`ExponentialMovingWindow` ops. (:issue:`47836`) | |||
- Deprecated producing a single element when using :meth:`Pandas.groupby` with a single list element. A tuple of length one will be returned instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to mention iterating over the groupby. Something like
a single element when iterating over a :class:
DataFrameGroupBy
or :class:SeriesGroupBy
that has been grouped by a list of length 1; a tuple of length...
Also, no period at the end and add the issue number at the end (as in the lines above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The end of the whatsnew note looks good - but saying :meth:`Pandas.groupby`
is incorrect (there is no pandas.groupby
method). See my suggestion above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhshadrach sorry didn't notice. How about now?
@rhshadrach Thanks a lot for your effort and reviews! How does it look now? |
@rhshadrach How does it look now? |
Co-authored-by: Richard Shadrach <45562402+rhshadrach@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for handling all the requests!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the merge conflict is reserved, LGTM
Thanks @ahmedibrhm! Very nice |
@ahmedibrhm this is producing a bunch of warnings in the tests. any chance you can update the relevant tests to avoid/catch these warnings? |
I think I caught a lot of them in #48159 |
@ahmedibrhm want to make a PR enforcing this deprecation? |
@jbrockmendel - I'm going to pick this up. |
doc/source/whatsnew/v1.5.0.rst
file if fixing a bug or adding a new feature.